<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
	<script type="text/javascript" src="/js/jquery-1.12.2.min.js"></script>
	<title></title>
	</head>
	<body>
	<center>
	关键字:<input id="keyword" onblur="suggestion()"><button onclick="search()">搜索</button>
	<div id="suggest">
		
	</div>
	</center>
	
	
	<script type="text/javascript">
	function search() {
		
	}
	
	function suggestion() {
   /*  $.ajax({
        url: "http://localhost:8080/solr/meilicat/select?wt=json&callback=?",
        data : {q:'cn:裙'},
        dataType: "jsonp",
        jsonp:'callback',  
        success: function (data) {
            console.log(data)
        }
    }); */
    $.getJSON("/suggest",{"text":$("#keyword").val()} ,function(data) {
    	$("#suggest").append(data[0].suggestions);
    });
	}
	</script>
	</body>
</html>
